package com.encryption.framework.logic
{
	import com.encryption.feature.doc.IItemChange;
	
	import mx.containers.ViewStack;

	public class ItemChangePageManager
	{
		private static var _instance = new ItemChangePageManager();
		
		private var _viewStack:ViewStack;
		private var _changeMap:Object = [];
		
		public function ItemChangePageManager()
		{
			_changeMap = {};
		}
		
		public static function get instance():ItemChangePageManager
		{
			return _instance;
		}
		
		public function setViewStack(value:ViewStack):void
		{
			_viewStack = value;
		}
		
		public function register(value:IItemChange):void
		{
			_changeMap[value.changeName] = value;
		}
		
		public function getChangePage(changeName:String):IItemChange
		{
			return _changeMap.hasOwnProperty(changeName) ? _changeMap[changeName] : null;
		}
	}
}